<template>
  <div class="bg-#F8F9FA py-88">
    <div text-center>
      <h1 text-35>常见问题解答</h1>
      <div class="text-#5F6368 text-16 mt-25 mb-48">使用插件过程中遇到的问题，这里可以找到答案</div>
    </div>
    <div>
      <el-collapse v-model="activeNames" @change="" w-900 m-auto>
        <el-collapse-item v-for="(i, idx) in list" :title="i.title" :name="i.id" :key="i.id">
          {{ i.content }}
        </el-collapse-item>
      </el-collapse>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import API from '@/request/api/index'
const activeNames = ref([])
const list = ref([] as any[])
onMounted(() => {
  API.getArticles({ type: 'faq' }).then(res => {
    list.value = res.data
  })
})
</script>

<style scoped lang="scss">
:deep(.el-collapse-item__header) {
  padding: 0 24px;
  border-radius: 12px;
  border-bottom: 1px solid #E0E0E0;
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.08);
  font-size: 17px;
  height: 76px;
}
:deep(.el-collapse-item__wrap) {
  padding: 24px;
  border-radius: 12px;
}
:deep(.el-collapse-item) {
  margin-bottom: 24px;
}
</style>
